import 'package:json_annotation/json_annotation.dart';
part 'EcyGoodsHomeCategoryModel.g.dart';

@JsonSerializable()
class EcyGoodsHomeCategoryModel {
  String? remark;
  String? name;
  String? id;
  String? iconUrl;
  bool? selected;
  int? index;
  String? code;
  EcyGoodsHomeCategoryModel(
      this.remark, this.name, this.id, this.iconUrl, this.selected, this.index, this.code);

  // 从JSON创建User实例的工厂方法
  factory EcyGoodsHomeCategoryModel.fromJson(Map<String, dynamic> json) =>
      _$EcyGoodsHomeCategoryModelFromJson(json);

  // 将User实例转换为JSON的方法
  Map<String, dynamic> toJson() => _$EcyGoodsHomeCategoryModelToJson(this);
}
